package com.neuedu.corejava.ch7.homework3;

public class TestStudent {
	public static void main(String[] args) {
		Student[] students = new Student[5];
		//向上溯型
		students[0] = new EnglishStudent(1001, "Jack", "男", 3, 88, 90, 100);
		students[1] = new ComputerStudent(1002, "Bill", "男", 60, 80, 85, 93, 86);
		students[2] = new LectureStudent(1003, "冰心", "女", 120, 98, 98, 90, 94);
		students[3] = new EnglishStudent(1004, "Tom", "男", 5, 90, 88, 98);
		students[4] = new ComputerStudent(1005, "Bruce", "男", 67, 88, 90, 93, 90);		
		for(Student student : students) {
			//注意对方法调用的理解，优先从子类中查询方法，调用跟子类最接近的方法
			//多态：对多态的理解
			student.showInfo();
		}
	}

}
